<template>
	<view class="content">
		<TabNavigation style="width: 100%;" :title="title"></TabNavigation>
	
		<card-box style="width: 100%;" :header="'交办单位承办情况'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<view class="main_banner">
					<image src="/static/bnc56tt.png"></image>
					<view class="number">
						1170
					</view>
				</view>
				<view class="main_card main_card_b">
					<view class="card" v-for="(item,index) in card4ImgList" :key="index">
						<image :src="item.url"></image>
						<view class="title" style="left:40rpx;color: #363636;">
							{{item.title}}
						</view>
						<view class="bottom" :style="`left:40rpx;color: ${item.unitColor};`">
							<text :style="`color: ${item.color};`">
								{{item.number}}
							</text>
							{{item.unit}}
						</view>
					</view>
				</view>
			</view>
		</card-box>

		<card-box style="width: 100%;" :header="'意见分类统计'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<customBar :data="barList" :barStyle="barStyle"></customBar>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>

		<card-box style="width: 100%;" :header="'2024年每月办理情况'">
			<view slot="main" class="content-card-main">
				<view class="markers">
					<view class="markers_item">
						<view class="left">
						</view>
						<view class="right">
							未办结
						</view>
					</view>
					<view class="markers_item">
						<view class="left left_b">
						</view>
						<view class="right">
							未办结
						</view>
					</view>
				</view>
				<view class="double_warp" v-for="(item,index) in doubleSpellingBarList" :key="index">
					<view class="header">
						{{item.month}}
					</view>
					<view class="double_spellingBar">
						<view class="redBar" :style="`width:${item.red}%`">
							{{item.red}}
						</view>
						<view class="blueBar" :style="`width:${item.right}%`">
							{{item.right}}
						</view>
					</view>
				</view>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>

		<card-box style="width: 100%;" :header="'2024年代表团意见分布情况'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<view class="seach">
					<view class="time">
						<uni-datetime-picker :border="false" type="date" :clear-icon="false" v-model="single"
							@maskClick="maskClick">
							<template #default>
								<view class="defTime">{{single?single:'统计开始时间'}}</view>
							</template>
						</uni-datetime-picker>

					</view>
					<view class="connecting_line">
						-
					</view>
					<view class="time">
						<uni-datetime-picker :border="false" type="date" :clear-icon="false" v-model="endSingle"
							@maskClick="maskClick">
							<template #default>
								<view class="defTime">{{endSingle?endSingle:'统计结束时间'}}</view>
							</template>
						</uni-datetime-picker>
					</view>
					<view class="btn_grounp">
						<button type="default">重置</button>
						<button type="primary">确定</button>
					</view>
				</view>

				<c-table :headerData="headerData" :tableData="tableData">
					<template v-slot:unitName="{data}">
						<view class="font unitName">
							{{data.unitName}}
						</view>
					</template>
					<template v-slot:rzrs="{data}">
						<view class="font controls" @click="lookView">
							{{data.rzrs}}
						</view>
					</template>
				</c-table>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>



		<card-box style="width: 100%;" :header="'代表随手拍满意度评价'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">
				<pieChart></pieChart>


			</view>
		</card-box>


		<card-box style="width: 100%;margin-bottom: 30rpx;" :header="'今日随手拍意见'">
			<view slot="main" class="content-card-main" style="padding-top: 0;">

				<view class="border_item" v-for="(item,index) in borderList" :key="index">
					<view class="name">
						{{item.name}}
					</view>
					<view class="content" v-for="(ele,ex) in item.list" :key='ex'>
						<view class="icon">
						</view>
						<view class="right">
							<view class="title">
								{{ele.title}}
							</view>
							<view class="son">
								{{ele.content}}
							</view>
						</view>
					</view>
				</view>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>
	</view>



</template>

<script>
	import TabNavigation from '@/components/TabNavigation.vue'
	import cardbox from '@/components/card/cardbox.vue'
	import cTable from '@/components/cTable/cTable.vue'
	import wordCloud from '@/components/wordCloud.vue'
	import customBar from '@/components/customBar.vue'
	import pieChart from './charts/chart5.vue'
	export default {
		components: {
			TabNavigation,
			wordCloud,
			customBar,
			pieChart,
			"card-box": cardbox,
			"c-table": cTable
		},
		data() {
			return {
				single: '',
				endSingle: '',
				header: "统计信息",
				title: '人大代表随手拍工作视窗',
				borderList: [{
						name: '周晓明',
						list: [{
								title: '类型',
								content: '交通管理'
							},
							{
								title: '涉事主题',
								content: '黄埔区办事效率低下事效率低下事效率低下事效率低下，黄埔区办事效率低下事效率低下事。'
							}
						]
					},
					{
						name: '周晓明',
						list: [{
								title: '类型',
								content: '交通管理'
							},
							{
								title: '涉事主题',
								content: '黄埔区办事效率低下事效率低下事效率低下事效率低下，黄埔区办事效率低下事效率低下事。'
							}
						]
					},
					{
						name: '周晓明',
						list: [{
								title: '类型',
								content: '交通管理'
							},
							{
								title: '涉事主题',
								content: '黄埔区办事效率低下事效率低下事效率低下事效率低下，黄埔区办事效率低下事效率低下事。'
							}
						]
					}
				],
				doubleSpellingBarList: [{
						month: '01月',
						red: 13,
						right: 56
					},
					{
						month: '02月',
						red: 33,
						right: 23
					},
					{
						month: '03月',
						red: 13,
					}
				],
				headerData: [{
						width: 30,
						align: 'left',
						name: '名称',
						value: 'unitName',
						solt: 'unitName'
					},
					{
						width: 20,
						align: 'left',
						name: '意见数量',
						value: 'rzrs',
						solt: 'rzrs'
					},

				],
				tableData: [{
						unitName: '越秀区',
						rzrs: 16,
					},
					{
						unitName: '海珠区',
						rzrs: 16,
					},
					{
						unitName: '海珠区',
						rzrs: 16,
					},
					{
						unitName: '海珠区',
						rzrs: 16,
					},
				],

				cardImgList: [{
						url: '/static/cd0537ec1.png',
						title: '满意',
						number: 72,
						unit: '%'
					},
					{
						url: '/static/cd0537ec2.png',
						title: '基本满意',
						number: 72,
						unit: '%'
					},
					{
						url: '/static/cd0537ec3.png',
						title: '不满意',
						number: 72,
						unit: '%'
					}
				],
				card2ImgList: [{
						url: '/static/ct35r2r.png',
						title: '办结数量',
						number: 1937,
						unit: '',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '未办结',
						number: 16,
						unit: '',
						color: '#21B626',
						unitColor: "#21B626"
					},
				],
				card4ImgList: [{
						url: '/static/ct35r2r.png',
						title: '已分办',
						number: 100,
						unit: '%',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '已签收',
						number: 100,
						unit: '%',
						color: '#21B626',
						unitColor: "#21B626"
					},
					{
						url: '/static/ct35r3r.png',
						title: '已答复',
						number: 72,
						unit: '%',
						color: '#A57504',
						unitColor: "#A57504"
					},

					{
						url: '/static/ct35r4r.png',
						title: '已评价',
						number: 38,
						unit: '%',
						color: '#F17666',
						unitColor: " #F17666"
					}
				],
				// 词云图数据
				wordCloud: [{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "法制类(4)",
						value: 4,
					},
					{
						name: "其他类(4)",
						value: 4,
					},
					{
						name: "预算类(32)",
						value: 32,
					},
					{
						name: "农村农业类(2)",
						value: 2,
					},
					{
						name: "社会建设类(35)",
						value: 35,
					},
					{
						name: "监察司法类(75)",
						value: 75,
					},
					{
						name: "经济类(4)",
						value: 4,
					},
					{
						name: "预算类(35)",
						value: 35,
					},
					{
						name: "经济类(2)",
						value: 2,
					},
					{
						name: "教科文卫类(2)",
						value: 2,
					},
					{
						name: "体育类(4)",
						value: 4,
					},
					{
						name: "经济类(32)",
						value: 32,
					},
					{
						name: "经济类(55)",
						value: 55,
					},
					{
						name: "监察司法类(55)",
						value: 55,
					},
					{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "教课文卫类(92)",
						value: 92,
					},
					{
						name: "其他类(35)",
						value: 35,
					},
					{
						name: "侨务类(4)",
						value: 4,
					},
				],
				barStyle: {
					color: '#F22C1F',
					background: 'linear-gradient(311deg, #FF1010 0%, #FFD3D3 100%);'

				},
				barList: [{

					name: '市容城管',
					value: 66,
				}, {

					name: '交通管理',
					value: 56,
				}, {

					name: '城市建设',
					value: 47,
				}]
			}
		},
		onLoad() {

		},
		methods: {
			maskClick(e) {
				console.log('maskClick事件:', e);
			}
		}
	}
</script>

<style scoped lang="scss">
	.header {
		display: flex;
		align-items: center;
		justify-content: space-between;

		.title {
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 28rpx;
			color: #000000;
			line-height: 33rpx;
			text-align: center;
			font-style: normal;
			text-transform: none;
			display: flex;
			align-items: center;

			image {
				width: 90rpx;
				height: 84rpx;
				margin-left: -9rpx;
			}

			text {
				margin-top: 4rpx;
			}
		}


		.header-right {
			position: relative;
			width: 234rpx;
			height: 52rpx;

			.img {
				width: 234rpx;
				height: 52rpx;
			}

			text {
				font-family: DIN, DIN;
				font-weight: 500;
				font-size: 28rpx;
				color: #FFFFFF;
				position: absolute;
				top: 50%;
				right: 20rpx;
				transform: translateY(-50%);
			}
		}

		.header-right1 {
			position: relative;
			width: 236rpx;
			height: 52rpx;

			.img {
				width: 234rpx;
				height: 52rpx;
			}

			text {
				font-family: DIN, DIN;
				font-weight: 500;
				font-size: 28rpx;
				color: #FFFFFF;
				position: absolute;
				top: 50%;
				right: 20rpx;
				transform: translateY(-50%);
			}

		}

	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		// background: #F6F6F6;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.content-card-main {
		padding: 26rpx 32rpx 32rpx 28rpx;

		.line {
			width: 100%;
			height: 12rpx;
			border-radius: 6rpx;
			background-color: #F5F7F9;
			margin: 46rpx 0 34rpx;
		}

		.seach {
			display: flex;
			flex-direction: row;
			margin: 24rpx 0 30rpx;

			.time {
				width: 184rpx;
				height: 54rpx;
				border-radius: 4rpx 4rpx 4rpx 4rpx;
				border: 2rpx solid #2A8BFD;
			}

			.connecting_line {
				width: 16rpx;
				height: 34rpx;
				margin: 0 14rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #2A8BFD;
				line-height: 50rpx;
				text-align: center;
				font-style: normal;
				text-transform: none;
			}

			.defTime {
				padding: 10rpx 20rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #2A8BFD;
				line-height: 28rpx;
				text-align: center;
				font-style: normal;
				text-transform: none;
			}

			.btn_grounp {
				display: flex;
				flex-direction: row;
				margin-left: 16rpx;

				:first-child {
					border: 0;
				}

				:last-child {
					margin-left: 14rpx;
					color: #FFFFFF;
					border: 0;
					background: linear-gradient(180deg, #1B74EF 0%, #5299F5 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
				}

				button {
					// width: 92rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 20rpx;
					color: rgba(0, 0, 0, 0.6);
					line-height: 23rpx;
					text-align: center;
					line-height: 54rpx;
					font-style: normal;
					text-transform: none;

					height: 54rpx;
					background: rgba(255, 255, 255, 0.2);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					border: 2rpx solid rgba(0, 0, 0, 0.2);
				}
			}
		}

		.markers {
			display: flex;
			flex-direction: row;
			justify-content: start;

			.markers_item {
				display: flex;
				flex-direction: row;

				.left {
					width: 32rpx;
					height: 32rpx;
					background: linear-gradient(360deg, #8DC1FF 0%, #2A8BFD 100%), #FF928A;
					border-radius: 0rpx 0rpx 0rpx 0rpx;
				}

				.left_b {
					background: linear-gradient(180deg, #FF1010 0%, #FFD3D3 100%), #FFD982;
				}

				.right {
					margin-left: 18rpx;
					margin-right: 16rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #4C4C4C;
					line-height: 28rpx;
					text-align: center;
					font-style: normal;
					text-transform: none;
				}
			}
		}

		.double_warp {
			display: flex;
			flex-direction: column;

			.header {
				margin: 26rpx 0 12rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 26rpx;
				color: #000000;
				line-height: 30rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
			}

			.double_spellingBar {
				display: flex;
				flex-direction: row;

				.blueBar {
					height: 29rpx;
					width: 250rpx;
					background: linear-gradient(311deg, #2A8BFD 0%, #8DC1FF 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					text-align: center;
					font-size: 24rpx;
					color: #FFFFFF;
				}

				.redBar {
					height: 29rpx;
					width: 293rpx;
					background: linear-gradient(311deg, #FF1010 0%, #FFD3D3 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					text-align: center;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}

		.border_item {
			margin-top: 34rpx;
			position: relative;
			background: #FFFFFF;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			border: 2rpx solid #EDEDED;
			padding: 30rpx 22rpx 24rpx;

			.name {
				position: absolute;
				padding: 8rpx 20rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 600;
				font-size: 24rpx;
				color: #FFFFFF;
				top: -26rpx;
				left: 20rpx;
				background: linear-gradient(135deg, #DF2F2F 0%, #FF8180 100%), linear-gradient(135deg, #FF0000 0%, #C70100 100%);
				border-radius: 4rpx 4rpx 4rpx 4rpx;
			}

			.content {
				display: flex;
				flex-direction: row;
				justify-content: start;
				position: relative;

				.icon {
					position: absolute;
					top: 30rpx;
					width: 20rpx;
					height: 20rpx;
					background: #FF1212;
					border-radius: 10rpx;

				}

				.right {
					margin-top: 30rpx;
					margin-left: 28rpx;

					.title {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #F22C1F;
						line-height: 28rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}

					.son {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #262626;
						line-height: 36rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
				}

			}

		}
	}

	.content-card-main .main_card {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.content-card-main .main_card_b {
		display: flex;
		flex-wrap: wrap;
	}

	.content-card-main .main_card .card {
		position: relative;
	}


	.content-card-main .main_card_b .card {
		flex: 0 0 auto;
		/* 或者根据需要设置具体的宽度 */
		position: relative;
	}

	.content-card-main .main_card .card .title {
		position: absolute;
		top: 26rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom {
		position: absolute;
		top: 72rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom text {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #000000;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card image {
		width: 204rpx;
		height: 148rpx;
	}

	.content-card-main .main_card_b .card image {
		width: 308rpx;
		height: 160rpx;
	}

	.content-card-main .main_banner {
		position: relative;
	}

	.content-card-main .main_banner image {
		margin-left: -12rpx;
		width: calc(100% + 20rpx);
		height: 161rpx;
	}

	.content-card-main .main_banner .number {
		position: absolute;
		font-family: DIN, DIN;
		top: 54rpx;
		right: 174rpx;
		font-weight: 500;
		font-size: 40rpx;
		color: #ffffff;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}


	.font {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		font-style: normal;
		text-transform: none;
	}

	.unitName {
		width: 362rpx;
		color: #000000;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
		/* 保持内容在一行显示，如果需要多行，可以移除这行 */
	}

	.statistics {
		width: 100rpx;
		color: #2A8BFD;
	}

	.controls {
		width: 100rpx;
		color: #2A8BFD;
	}

	.indexThree {
		width: 200rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index {
		width: 50rpx;

	}

	.indext {
		width: 100rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index4 {
		width: 100rpx;
	}

	.table_footer {
		margin-top: 26rpx;
		text-align: center;
		width: 100%;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #2A8BFD;
		line-height: 28rpx;
		font-style: normal;
		text-transform: none;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.triangle {
		margin-left: 6rpx;
		width: 0;
		height: 0;
		border-left: 9rpx solid transparent;
		/* 左侧透明 */
		border-right: 9rpx solid transparent;
		/* 右侧透明 */
		border-top: 12rpx solid #2A8BFD;
		/* 上侧为实心颜色 */
	}

	.wordCloud-warp_main {
		/* 	width: 652rpx;
		height: 384rpx; */
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 2rpx solid #E8E8E8;
	}
</style>